/*
 * SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD
 *
 * SPDX-License-Identifier: CC0-1.0
 */

#include <stdio.h>
#include <inttypes.h>
#include "adc_driver_once.h"


#define EXAMPLE_CHASE_SPEED_MS 10 //延时10ms

#define EXAMPLE_ADC_ATTEN           ADC_ATTEN_DB_12
#define ADC_NUM ADC_UNIT_1
#define ADC_CHANNEL ADC_CHANNEL_7

void app_main(void)
{
    device_adc_init(ADC_NUM,ADC_CHANNEL);
    while (1)
    {
        printf("adc read is %d\n",device_adc_read(ADC_CHANNEL));
        vTaskDelay(pdMS_TO_TICKS(EXAMPLE_CHASE_SPEED_MS)); //延时10ms
    }
}
